// Informatica MDM Hub Web Frontend JavaScript Functions

function clearForm(oForm) {
	var elements = oForm.elements;
	oForm.reset();
	var i = 0;
	for (i = 0; i < elements.length; i++) {
		field_type = elements[i].type.toLowerCase();
		switch (field_type) {
		case "text":
		case "password":
		case "textarea":
			elements[i].value = "";
			break;
		case "radio":
		case "checkbox":
			if (elements[i].checked) {
				elements[i].checked = false;
			}
			break;
		case "select-one":
		case "select-multi":
			elements[i].selectedIndex = -1;
			break;
		default:
			break;
		}
	}
}
